|
I currently have a single threaded application that contains a
strongly typed dataset (called dsdataset1) with 3 tables, all bound to
comboboxes on my main form.
This works in its current form (the datasets are filled on the form
load event).
I noticed a problem whereas the form doesn't draw until the datasets
are filled, so I figured I'd use the background worker component to do
the dataset filling on a seperate thread.
For some reason, I cannot get this to work properly. My program
loads, and my dataset is filled, however my comboboxes are no longer
bound to the dataset. It's driving me nuts.
I've tried passing the dataset back out during the runworkercompleted
event (i.e. dsdataset1 = ctype(e.result, dataset)), but even that
doesn't work. I even tried resetting the bindingsource.datasource for
my combobox back to the dataset after passing the dataset out, but no
go. I'm at a loss.
Any suggestions?
|
|
|
|
|
Hi,
i have serious problems to print a Windows Form with some Textboxes...
The printing should work in background...
I really can't find a working solution.. so please help me!!!
' that form with textbox controls
Dim rForm As MyForm = New MyForm ()
' image to save / or to print
formImage = New Bitmap(rForm.Width, rForm.Height)
Dim rec As New Rectangle(0, 0, formImage.Width, formImage.Height)
'print the form
rForm.DrawToBitmap(formImage, rec)
'save as image
formImage.Save("d:\screen.bmp")
The code can be on c# or vb.net!!!
Thank's for your answers!!!
|
|
|
|
|
|
Hi to everyone.In my visual c++ window form appplication, i want to open a directory (of images) and see the images in a picturebox.
I know that i can use folderborwserdialog to select the directory but when i've the path selected in the folderbrowserdialog how can i use the files in it? Have i to pass something to an imagelist??
Thanks for answers, bye .
|
|
|
|
|
Where do you want to show those images? If you have another form for images then you can retrieve all the images from the folder path you got using folderbrowsedialog
|
|
|
|
|
I've a solution...(take the directory name and gets the files in it).
String^ folderName;
array <string^>^ files;
System::Windows::Forms::DialogResult result = folderBrowserDialog1->ShowDialog();
if ( result == ::DialogResult::OK )
{
folderName = folderBrowserDialog1->SelectedPath;
}
files=System::IO::Directory::GetFiles(folderName);
if(files->Length!=0)
for(int i=0;i<files->Length;i++)
{
FileInfo^ fi = gcnew FileInfo(files[i]);
if(fi->Extension==".jpeg" || fi->Extension==".bmp"||fi->Extension==".jpg")
{
Bitmap^ cap=gcnew Bitmap(fi->FullName);
this->capture_img_box->Image=cap;
System::Threading::Thread::Sleep(1000);
this->Refresh();
Application::DoEvents();
}
}
Thanks however for the answers.
Bye.
|
|
|
|
|
how change specific row back color in DataGrid?
i have a DataGrid with some rows, how change row back color, like set row 1 with back color is red, row 2 is blue, row 3 is yellow
thanks
|
|
|
|
|
What infomation are you showing
like a report
|
|
|
|
|
no, i only want change specific row back color, and i want know how to do that ?
thanks
|
|
|
|
|
I don't think you can do that in Windows Forms.
|
|
|
|
|
i think can be done, but i don't know how?
like properties BackColor of DataGrid, it change bg color of odd number row
|
|
|
|
|
I was just wondering because datagrid does not have a Row(s) property.
|
|
|
|
|
Sorry a bit of a late reply but hopefully this will still help you.
You can set a rows color using the following line:
dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Blue;
(where 'i' is the current row as i am assuming you will have a loop so you can set the color depending on the row index).
You can also set the default row and cell styles using the properties window however this will apply to every cell and row.
|
|
|
|
|
Hello All,
Please help me solve this problem. I want to create an editor/designer that will handle the following situation.
I have an abstract class Marker, and many different implementations that will not be exposed to the user.
The markers are created through a factory system, MarkerFactory, and I have a collection
of the markers in a Control that I will to create the editor/designer for.
<br />
public class Marker<br />
{<br />
protected Marker(...){}<br />
} <br />
<br />
internal class AMarker : Marker<br />
{<br />
} <br />
<br />
internal class BMarker : Marker<br />
{<br />
} <br />
<br />
public class MarkerFactory<br />
{<br />
public Marker Create(...) {return newMarker;}<br />
}<br />
<br />
public class MarkerControl : Control<br />
{<br />
[MarkerDesigner]<br />
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]<br />
public IList<Marker> Markers<br />
{<br />
get{ return markerList;}<br />
}<br />
} <br />
Any guide/hint as to how I could create such an UITypeEditor, that will work with the
factory system.
Best regards,
Paul.
-- modified at 10:40 Monday 18th June, 2007
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Please don't cross post in multiple forums.
|
|
|
|
|
I thought I saw this question earlier in another forum :->
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
I cannot believe that in this day and age I cannot find a control to edit time.
There are controls which can almost make coffee, but not one where a user can easily enter the time.
I am not talking about the 13:45:65 PM thing where the user must select each two digit pair,
edit it or run the minute spinner buttons. It must be easier.
Like a clock view where you drag the hour, minute and seconds hands, and it snaps to every 1,5,10,15,30,60 or whatever minutes
and you can select Now with one click, and so on.. Surely nothing compared to making coffee.
Am I looking in the wrong places ?
Please help.
|
|
|
|
|
see the datetimepeaker control in visual studio
etretyertyery
|
|
|
|
|
can anybody tell me how can i insert into a column in microsoft access that have a yes/no datatype
plz help me regards
etretyertyery
|
|
|
|
|
It just remember my college days.
Now and all i am not using MS-Access we are using Oracle and SQL SERVER 2000/2005.
For more Details about MS-Access Get it[^]
Regards,
Satips.
|
|
|
|
|
I presume that yes/no would map to a boolean data type.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
their is a sample query that i use:
update tblClient set exist='no' !!!! but their is something wrong in this query because it can't
update the following record that have a yes/no datatype.
please if we have something to do in access or something in my code so plz help me?????
thanks
etretyertyery
|
|
|
|
|
I would suspect from your example there that the problem is the quotes around 'no'. This implies that it is a string type. Replace this with false instead.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hey this is not the problem, i still have the problem
plz i need that any help
bye
etretyertyery
|
|
|
|
|
tantoun wrote: set exist='no'
'no' is a string. This isn't going to work, as someone else said. It's almost certainly the case that you need to use a boolean to set it.
I googled, and found this[^] within seconds. We were right, you set it using the boolean type.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|