-
- Visual C#
by ghrueff
- 7211 Replies
- ghrueff Views
- Last post
-
accessing files downloaded by webbrowser control
- I am writing a form that contains a webBrowser control. I'd like to filter the downloads that the control makes before it gets them for rendering the webpage. The event webBrowser.FileDownload indicates when a file is downloading but I can not find a way to access the file that has just been downloaded (unless of course it is an HtmlDocument). It seems like these files should only be a . away. Typical files that I can not seem to access are image files, xml files, etc.
Sincerely,
ghrueff
-
- IE Development
by IECUSTOMIZER
- 2881 Replies
- IECUSTOMIZER Views
- Last post
-
updated imagelist.htm - toolbar button and tools menu
- Hi, I have debugged and updated the imagelist.htm utility that was originally published by MS for IE5+. It is now compatible with IE6 SP2 and IE7.
http://www.iecustomizer.com/ url=iebuttons/ txtProvider=117
Regards.
-
- Windows Forms
by Erniemon1
- 12743 Replies
- Erniemon1 Views
- Last post
-
- Visual Studio
by LuckyStarfo
- 16716 Replies
- LuckyStarfo Views
- Last post
-
filter data between two combobox(master and detail data) in feb ctp avalon
- Dear Keith Boyd,
I am working with comboBox control. In that there are two comboBox, a comboBox contain master table(include Name, ID columns) and a comboBox contain detail of the master comboBox(include Name, PersonName, ID, Description...).
My axml code:
<Window x:Class="WindowsApplication2.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="WindowsApplication2" Height="300" Width="300"
Loaded="OnLoad"
>
<Window.Resources>
<DataTemplate x:Key="template1">
<TextBlock Text="{Binding Name}"></TextBlock>
</DataTemplate>
<DataTemplate x:Key="template2">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}"></TextBlock>
<TextBlock>-</TextBlock>
<TextBlock Text="{Binding ID}"></TextBlock>
</StackPanel>
</DataTemplate>
<DataTemplate x:Key="templateFilter">
<TextBlock Text="{Binding Name}"></TextBlock>
</DataTemplate>
</Window.Resources>
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height ="Auto"/>
<RowDefinition Height ="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions >
<ColumnDefinition >
</ColumnDefinition>
</Grid.ColumnDefinitions>
<StackPanel Name="rootType" Grid.Column ="0" Grid.Row ="0">
<ComboBox Grid.Column ="0" Grid.Row ="0" Name="cbType" ItemsSource="{Binding}" ItemTemplate="{StaticResource templateFilter}" SelectionChanged ="TypeChange" SelectedValuePath ="ID"/>
</StackPanel >
<StackPanel Name="root" Grid.Column ="0" Grid.Row ="1">
<ComboBox Name="cb" ItemsSource="{Binding}" IsSynchronizedWithCurrentItem="True" ItemTemplate="{StaticResource template1}" DropDownOpened="aaa" DropDownClosed="bbb" SelectionChanged ="Description_Change"/>
<TextBox x:Name="txtName" Text="{Binding Path=Name, Mode=TwoWay}" MouseDoubleClick ="Clink_Double"></TextBox>
<CheckBox x:Name ="checkDefault" IsChecked="{Binding Default, Mode=TwoWay}">Default</CheckBox>
</StackPanel>
</Grid>
</Window>
Code behind:
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Data;
using System.ComponentModel;
namespace WindowsApplication2
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : Window
{
//int id;
private DataSet _dsPerson;
public Window1()
{
InitializeComponent();
// id = 2;
//DataView defaultView = new DataView(_dsPerson.Tables[0]);
//defaultView.Table.Rows[0][0] = "Kakaka";
_dsPerson = new DataSet();
}
public void OnLoad(object s, RoutedEventArgs e)
{
_dsPerson = new DataSet();
_dsPerson.Tables.Add("Person");
_dsPerson.Tables[0].Columns.Add("Name", Type.GetType("System.String"));
_dsPerson.Tables[0].Columns.Add("ID", Type.GetType("System.Int32"));
_dsPerson.Tables[0].Columns.Add("Default", Type.GetType("System.Boolean"));
DataRow dr;
dr = _dsPerson.Tables["Person"].NewRow();
dr["Name"] = "Email Description 1";
dr["ID"] = 1;
dr["Default"] = true;
_dsPerson.Tables["Person"].Rows.Add(dr);
dr = _dsPerson.Tables["Person"].NewRow();
dr["Name"] = "Email Description 2";
dr["ID"] = 2;
dr["Default"] = true;
_dsPerson.Tables["Person"].Rows.Add(dr);
dr = _dsPerson.Tables["Person"].NewRow();
dr["Name"] = "Email Description 3";
dr["ID"] = 2;
dr["Default"] = false;
_dsPerson.Tables["Person"].Rows.Add(dr);
dr = _dsPerson.Tables["Person"].NewRow();
dr["Name"] = "Email Description 4";
dr["ID"] = 2;
dr["Default"] = false;
_dsPerson.Tables["Person"].Rows.Add(dr);
root.DataContext =_dsPerson.Tables[0];
// Add new ID
_dsPerson.Tables.Add("PersonID");
_dsPerson.Tables["PersonID"].Columns.Add("Name", Type.GetType("System.String"));
_dsPerson.Tables["PersonID"].Columns.Add("ID", Type.GetType("System.Int32"));
dr = _dsPerson.Tables["PersonID"].NewRow();
dr["Name"] = "Type 1";
dr["ID"] = 1;
_dsPerson.Tables["PersonID"].Rows.Add(dr);
dr = _dsPerson.Tables["PersonID"].NewRow();
dr["Name"] = "Type 2";
dr["ID"] = 2;
_dsPerson.Tables["PersonID"].Rows.Add(dr);
rootType.DataContext = _dsPerson.Tables["PersonID"];
}
DataSet _dsPerson2;
private void oo(object s, RoutedEventArgs e)
{
if (_dsPerson2!=null)
MessageBox.Show(_dsPerson2.Tables[0].Rows[0][0].ToString());
}
private void aaa(object s, EventArgs e)
{
//cb.ItemTemplate = (DataTemplate)FindResource("template1");
}
private void bbb(object s, EventArgs e)
{
//cb.ItemTemplate = (DataTemplate)FindResource("template1");
}
private void Description_Change(object sender, SelectionChangedEventArgs e)
{
//txtName.Text = "";
//checkDefault.IsChecked = false;
//DataRowView view = (DataRowView)cb.SelectedItem;
//txtName.DataContext = view;
//checkDefault.DataContext = view;
}
private void TypeChange(object sender, SelectionChangedEventArgs e)
{
int id=(int)cbType.SelectedValue;
Filter(id);
}
/// <summary>
/// Count number phone number of phone number typeID
/// </summary>
/// <returns>number of phone number typeID</returns>
private int NumberPhoneOfPhoneType(int typeID)
{
int countType = 0;
int countPhoneNumber = _dsPerson.Tables[0].Rows.Count;
if (countPhoneNumber >= 0)
{
for (int i = 0; i < countPhoneNumber; i++)
{
DataRow row = _dsPerson.Tables[0].Rows;
if ((int)row["ID"] == typeID)
{
countType++;
}
}
}
return countType;
}
ICollectionView GetFamilyView()
{
ICollectionView view = CollectionViewSource.GetDefaultView(_dsPerson.Tables["Person"]);
return view;
}
private void Filter(int id)
{
//if (NumberPhoneOfPhoneType(id) > 0)
{
BindingListCollectionView view = (BindingListCollectionView)GetFamilyView();
view.CustomFilter = "ID=" + id.ToString();
}
//else
{
}
}
private void Clink_Double(object e, RoutedEventArgs e1)
{
DataRowView view = (DataRowView)cb.SelectedItem;
Window3 form = new Window3(view);
form.ShowDialog();
}
}
}
When I selected change on master comboBox system will filter data for detail base on ID of master. Then I selected a item on detail comboBox. but don't selected at current Item which was selected so databind into default and textbox incorrect. Actually, I want to when selected at detail comboBox. Data should be filled into textbox and default check approxiate which the selected item.
Can you help me
Thanks for your supporting,
Starfo
-
- Game Technologies
by brian_tsim
- 6072 Replies
- brian_tsim Views
- Last post
-
texture alpha channel problem
- Hi all,
I created mesh.box object with my game. The mesh has a texture. I want to set the mesh alpha channel 80%. How to change a mesh alpha channel for c# Below is my source code.
//create mesh object
boxMesh = Mesh.Box(renderer.Device, 100,100,100);
//==========================================
//on paint
renderer.Device.SetTexture(0, texture);
boxMesh.DrawSubset(0);
//============================================
Best regards,
-
- SharePoint Products
by TreyTro
- 1888 Replies
- TreyTro Views
- Last post
-
kpi detail web part
- I installed the trial version of Office SharePoint Server 2007 and enabled Enterprise features.
I then followed the instructions here to create a KPI list: http://office.microsoft.com/en-us/sharepointserver/HA100800271033.aspx
Now I want to display the KPI's using the KPI Detail Web Part, but I don't see that particular web part when I bring up the Add Web Part screen. In fact, I do not see the Dashboard section as mentioned in the article:
"In the Add Web Parts dialog box, in the All Web Parts section, under Dashboard, do one of the following.
To insert the entire KPI list, select Key Performance Indicators.
To choose one KPI from the KPI list, select KPI Details. "
Any idea how I install the Dashboard web parts
Thanks,
Trey
-
- Audio and Video
by Lux-
- 1166 Replies
- Lux- Views
- Last post
-
z-index with <object> and <g:background>
- I'm nearing completion of my gadget, but I have one last feature which is stalling me.
My gadget is using an ActiveX control to stream video from a webcam. Everything is working great, however I am running into the old problem of not being able to catch onclick events on the <object> tag. My workaround so far has been to use onmouseover, which works fine, but it is less than perfect.
While messing around with g:background, however, I noticed that if the z-index is higher than the z-index of the ActiveX object, I suddenly can right-click on the object and get the normal gadget context menu. Usually, that does not work. Also, the onmouseover event on the object stops firing, which leads me to believe that in some way the g:background is layering over the object. However, setting up onclick events with g:background still doesn't get me anywhere.
Does anyone have any idea why g:background seems to have this pseduo-functionality It seems odd to me that placing it over the object gives me partial functionality, while still not letting me catch the mouse events.
Thanks for any help.
-
- Visual Basic
by goodbiz1000
- 8556 Replies
- goodbiz1000 Views
- Last post
-
need to create search bar for database
- Greetings, I am completely and utterly amazed at the lack of information on how to create or employ a search bar. This is the one simple attribute that has made the internet what it is today. Nearly every program I have ever used has a search bar which, when data is entered into the textbox and the search button is clicked, it returns matching criteria. However, I have searched (Imagine That) Google, Yahoo,LearnVisualStudio.net, MSDN, and Help for three days on how to create such a simple procedure and have found nothing.
What I need to do:
I am creating a database where I have all my Employees Information which includes columns: [Employee Number], [Emloyee First Name], [Employee Last Name], etc.... I have created the database and dataset. I have put a search button and search textbox on the form. This is where my problem arises... I don't know how to create code or drag and drop procedures to get the search button to search (Imagine That) in the database and display the [Employee First Name] and [Employee Last Name] that is associated with the [Empoyee Number] that is entered in the search textbox. I also do not want this information to be edited where it is displayed. I will do that on another form.
Any help would be greatly appreciated.
-
- Microsoft ISV
by Jamie Clayton
- 1294 Replies
- Jamie Clayton Views
- Last post
-
how to detect if access is opened exclusively
- Hello,
I have just adjusted my Access database to use local tables to do data entry then send that data to the shared data tables (split DB - GUI/Data mdb's) and as a result will need to ensure that users have got a local PC copy of the GUI database file. So testing for the GUI file being opened exclusively via cmd /excl command line would be good (or via the Access DB options ->Advanced -> exclusive ).
I can not seem to find the VBA method for testing if the CurrentDB is opened in Exclusive mode. Does anyone know the answer
-
- Visual FoxPro
by Aleniko29139
- 793 Replies
- Aleniko29139 Views
- Last post
-
- Smart Devicet
by qoo942
- 7432 Replies
- qoo942 Views
- Last post
-
custom menu in customform
- Hello,Every one:
Does any one know how to use custom menu in CustomForm sample(or Tv_inbox sample)
I tried to create menubar for my customform,but it was overlap by default menu.
I don't want to use Context menu to extend default menu,
I want to handel all menu item by myself.
If some one know how to do or any ideas,Please give me some suggest.
If you don't know my question,i can describe more detai.
Thanks....
-
- .NET Development
by sydes141
- 13098 Replies
- sydes141 Views
- Last post
-
bug on the registry function
- Hello,
A program is reading some value in the registry to apply some configuration. When reading the registry in sequence for several keys, there is about 2% chance that the read will fail and return an empty string on some machine.
This program was in C and upgraded to VB.net. It is run with the framework 1.1.
The program always worked well in C, the bug appeared with VB.NET.
I have made an application to make a stress test to the registry.
Begin
//Each time you make a read, you open the key, get the value and then close the key.
loop from 1 to 100
var1 = readRegistryKey
var2 = readRegistryKey
var3 = readRegistryKey
var4 = readRegistryKey
var5 = readRegistryKey
var6 = readRegistryKey
var7 = readRegistryKey
var8 = readRegistryKey
var9 = readRegistryKey
var10 = readRegistryKey
End Loop
If var1 or var2 ... or var10 = String.empty then
show an error message.
End if.
End
This program give 100% good result on some machine and had an average of 2% failure on some other machine.
We have system that are:
Windows2000 ServerSP4
WindowsXP
WindowsServer2003
Some are WTS.
Some ar virtual
We have yet have'nt test on WS2003. The test run OK on windowsXP (for now)
So we have problems with some Windows2000 machine.
The test demonstrated that having framework 1.1 with or without SP1 or that being WTS or not as nothing
to do with the problem. Being a virtual machine doesn't seem to be a problem either.
So now is the question.
What would be the correctives for this bug
A corrective surely exist since the test worked well on some machine and not on other that run with the same OS. The test is stable, the result are always the same on the same machine.
Thanks
Sylvain
-
- Windows Vista
by xeondev
- 6718 Replies
- xeondev Views
- Last post
-
validating mandatory binding
- Hi all,
I have created a really simple activity just having one dependency property. I wanted this property to be mandatory bound in the designer. When the activity it is dropped on a workflow the property editor should have a nice red dot near the property, and after the explicit bound the dot disappears.
In fact this code won't complile: Activity 'SimpleActivity' validation failed: Property 'Input' is not set.
What should i do to make this work
Thanks
X
[ActivityValidator(typeof(SimpleValidator))]
public partial class SimpleActivity: Activity
{
public static readonly DependencyProperty InputProperty =
DependencyProperty.Register("Input", typeof(string), typeof(SimpleActivity));
public string Input
{
get { return (string)GetValue(InputProperty); }
set { SetValue(InputProperty, value); }
}
public SimpleActivity()
{
InitializeComponent();
}
}
public class SimpleValidator : ActivityValidator
{
public override ValidationErrorCollection Validate(ValidationManager manager, object obj)
{
ValidationErrorCollection errors = base.Validate(manager, obj);
SimpleActivity act = obj as SimpleActivity;
if (act != null)
{
if (!act.IsBindingSet(SimpleActivity.InputProperty))
{
errors.Add(ValidationError.GetNotSetValidationError("Input"));
}
}
return errors;
}
}
-
- Visual C++
by stroller
- 5780 Replies
- stroller Views
- Last post
-
how to form a avi or wmv file
- Hi
I am working on a project about screen capturing. I came cross a problem when I can get the screen and put the DIB into the memory. the project request that the software must get 15 frames/minute and form a avi or wmv file . Now , I just can get 5 frames/minute using the GDI . I must improve my method of screen capturing and I don`t know how to form a avi or wmv file , If anyone can give any advices about the problem , it will be a grateful thing.
-
- VS Team System
by Badhris
- 15574 Replies
- Badhris Views
- Last post
-
right click...
- Hi...
I have 2 doubts,
1. How to get the menu handle which appears when the user right clicks in slideshow window
2. Is there a way to write our own code for the selection of the menu item from the menu which appears when the user right clicks in the slideshow window...
Plzzzzzzzzzzzzzzzzzzzz someone help me in this...