|
Figured it out. If anyone ever wants to do this:
Don't pass an image to the datatable, instead pass the location of the new file.
Then in the DataGridImageColumn class make the following adjustment:
string ImageFile = (string)GetColumnValueAtRow(Source, RowNum);
Image img = Image.FromFile(ImageFile);
Bitmap ImagePic = (Bitmap)img;
Problem is that when you put the image file in the table, it can only hold a limited number of bytes for it (8kb) and you lose much of the image's data.
Hope this helps someone one day,
RABB17
|
|
|
|
|
Hello,
I use InternetExplorer object to go to an url through IE. But, the page requires user name and password login. The boxes are in a popup dialog (javascript I think).
How can I fill in the user name and password?
Moreover, how can I click the button ('Yes') in the popup dialog?
Thanks for your help!
|
|
|
|
|
You call the url with the user pass embedded.
IOW http://user:pass@www.foo.com
Should work, well it did many years back
|
|
|
|
|
sorry, the page fails to be displayed if I type: https//user:pw@www.mypage.com
Any suggestion please?
|
|
|
|
|
Archyami wrote: https//user:pw@www.mypage.com
https://user:pw@www.mypage.com
|
|
|
|
|
"The page cannot be displayed"
|
|
|
|
|
Just to make sure:
Did you replace "user" and "pw" in the URL with the actual user name and password?
---
b { font-weight: normal; }
|
|
|
|
|
yes.
https://myname:mypw@mypage
-> "The page cannot be displayed"
https://mypage
-> popup a dialog for username and pw
|
|
|
|
|
There is a "security alert" popup dialog from windows before the popup login.
Is it the cause of failure using
https://myname:mypw@mypage
?
If so, how to avoid the "security alert" popup dialog?
Thanks!
|
|
|
|
|
hi all i have searched the codeproject for password related articles but to no avail..can anyone provide me with any links or articles that do an application that requires the user to input a password and to verify before allowing him to continue with the application??
|
|
|
|
|
Well, it's kind of trivial. The hard part is deciding how to store your password and how secure you want it to be. All you need is a form that takes a username and password and that needs to return success before the rest of the app runs.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
ok thanks do u have a sample application or link where i can get to analyse the source codes? appreciate for yr help
|
|
|
|
|
Not really. Create a form that takes a username and password, and have your code call it. Hook up the OK and Cancel buttons to DialogResult.OK and Cancel. Make the OK button not work unless the username/password is correct. Have your app close if the dialog returns DialogResult.Cancel.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Is there an open source or free Checked ComboBox in .Net, either C# or VB.Net?
I have been searching high & low but to no avail.
|
|
|
|
|
Finally i found a link in codeproject.com after two weeks of searching..
The URL is
http://www.codeproject.com/cs/miscctrl/customcombos.asp
Mmm. The strange think i found the link from
http://www.tech-archive.net/.
Looks like Codeproject search engine should be improved.
|
|
|
|
|
Hi,
I am trying to find out why my program isn't working so I inserted a breakpoint where the error occurs. When I then step thru after checking the variable is populated in the "locals" window everything works fine. I remove the breakpoint and it falls over again.
Background:
There is a combobox populated with dates gathered from a database. The selected combobox.text value is then used to pass into a oledb select command to populate a datagrid. Excerpts are:-
string fDate = this.comboBoxTresReport.Text.ToString();
DateTime fromDate = Convert.ToDateTime(fDate);
When I put a breakpoint at the first line AND I CHECK THE VALUE OF THE VARIABLE CONTAINED AT this.comboBoxTresReport.Text the program steps thru Ok. Remove the breakpoint OR I do not check the variable this.comboBoxTresReport.Text the second line generates an error "String was not recognized as a valid DateTime."
What have I missed doing?
Glen Harvy
|
|
|
|
|
This means you have a race condition. Stopping the program means that everything sorts itself out in the time it takes for the breakpoint. Is the app multithreaded ?
Ah.... that's interesting. Obviously, checking the text has a side effect on the code. What if you add a line like string s = this.comboBoxTresReport.Text , does that solve the problem ? Note, I am not advocating this as a solution, just wondering if the root issue is that when the string is first evaluated, it works for some reason.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for your prompt response.
Christian Graus wrote: Is the app multithreaded ?
Being new to this I really don't know if it is or isn't. I haven't specifically done anything to make it so or otherwise .
Christian Graus wrote: What if you add a line like string s = this.comboBoxTresReport.Text
I added that to code just before mine and it didn't make any difference.
Glen Harvy
|
|
|
|
|
Then it's not multithreaded.
OK, then the evaluation in the debugger is what causes the difference. That's pretty strange.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Could it be that the combobox is not filled (what is the right term ) at the time that I'm getting it's value? Using the debugger would fill it wouldn't it?
If this is the case, how do I make sure the combobox is filled prior to me getting it's value?
Glen Harvy
|
|
|
|
|
Using the debugger shouldn't be putting values in the combobox, but you can check by checking the combo.Items.Count property ( or something like that. ) If there's any chance the combo is empty, your code should have that check anyhow.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Glen Harvy wrote: What have I missed doing?
Outside guess: CultureInfo...
|
|
|
|
|
Glen Harvy
|
|
|
|
|
Glen Harvy wrote: string fDate = this.comboBoxTresReport.Text.ToString();
DateTime fromDate = Convert.ToDateTime(fDate);
Are you executing this code in response to a button click or some UI event?
|
|
|
|
|
The method is called from the Form_Load method as well as a response to data changes in other user controls later in the program. As far as I can tell, it only fails when called from Form_Load. I have also made sure the call is the final call in the Form_Load method.
I have "worked around" the issue by checking if fDate is empty (which is probably good coding practice anyway) and then filling it with what the fDate does/should/will hold when viewed by the user.
Glen Harvy
|
|
|
|