|
|
If you have binary data in an image field, you can't just write it out into the response stream. You have to make a proxy page that will get the data from the database and write it out. The proxy page will work just like if it was an image file. E.g.:
A hyperlink field in the database has nothing to do with an html hyperlink, it's a hyperlink that is used by Office applications. You can extract the data from the field and create an html link from it, but it's easier to do if you store the information in regular text fields instead.
---
b { font-weight: normal; }
|
|
|
|
|
How can i set a Location of a form then show it correctly?
If i make this:
MyForm f = new MyForm();
f.Locaion = myPoint;
f.Show();
it doesn't Locate the Form at myPoint position.
|
|
|
|
|
do it onLoad event and will work
|
|
|
|
|
Also, you have to make sure that the StartPosition property is set to Manual for the form.
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
i want to use for the standard button myown png images.
Using for the normal state one png, for the mousemove another and for mouse down another one too.
How?
|
|
|
|
|
Add a handler for MouseDown, MouseUp, MouseOver events for the Button and set the Image property accordingly.
|
|
|
|
|
Hello, here are some beginners questions
First, how do i get a form to return a value? If i allow the user to select something, like a object of some kind, how do i return this object to the class that called the form?
Secondly, how do i determine if a class fulfills a certain interface?
To clarify this question, i have this function that loads DLL:s but theese contain many classes, and i wont it only to load those classes that implements the IMyForm interface, please advice
private Form loadPlugIns(String dllName) {<br />
try<br />
{<br />
Assembly MyAssembly = Assembly.LoadFrom(dllName);<br />
Type[] Types = MyAssembly.GetTypes();<br />
<br />
foreach (Type oType in Types)<br />
{<br />
try<br />
{<br />
if ((oType.IsClass == true))<br />
{ <br />
object ibaseObject = Activator.CreateInstance(oType);<br />
Form form;<br />
form = (Form)oType.InvokeMember("getForm", BindingFlags.Default | BindingFlags.InvokeMethod,<br />
null, ibaseObject, null);<br />
return form;<br />
}<br />
} catch (Exception ex)<br />
{<br />
VirheHallinta.LogException("Failed to load module.", ex);<br />
}<br />
}<br />
return null;<br />
} catch (Exception ex)<br />
{<br />
System.Windows.Forms.MessageBox.Show(ex.ToString());<br />
return null;<br />
}<br />
}
Hm, looks awfull (my code) in the window...
R
Johan
-- modified at 6:01 Friday 30th December, 2005
|
|
|
|
|
Hi,
1. There are several prossibilities.
a) Show the Form as you would normally with ShowDialog and add a property to it so the result can be retrieved afterwards. This is like the built in dialogs of .Net work.
b) Define your own ShowXY function in your form which internally calls ShowDialog on himself and returns the wanted result:
public MyObject ShowMyForm(){
if (this.ShowDialog() == DialogResult.Ok)
return _myResult;
else
return null;
}
2. There are several way to do this. One is:
if (Array.IndexOf(t.GetInterfaces(), typeof(IMyInterface)) >= 0)
Console.WriteLine("Interface implemented");
else
Console.WriteLine("Interface not implemented");
|
|
|
|
|
|
Can forms return a value to, let's say the winmain function, or can something like SendMessage be used to send s message to another window's callback function? If so how?
m$: It is normal for your screen to go blank and for your computer to restart itself several times
|
|
|
|
|
Hi all,
I've created a service that needs to log in a different log then the application log. Therefor I've added the following line of code:
System.Diagnostics.EventLog.CreateEventSource("ServiceOne", "ServiceOneLog");
But when I run the InstallUtil I can see that it automatically adds the eventsource in the application log.
Does anybody have an idea how to make sure that my logs are put in ServiceOneLog? Or is there a way to tell the InstallUtil to which Log he needs to add the source?
Thanks in advance,
Geert
|
|
|
|
|
Hi all,
I'm trying to select a tab from the windows form's standard tab control on right clicking of mouse button.
The mouse event args gives me the location of the mouse pointer.
But the tab control doesn't expose any method or property to get the tab on which my mouse
pointer is hovering.
Has anyone of you faced similar problem like this ? Or atleast it will be nice if anyone can show me a pointer towards solving this problem.
Hoping to hear from you guys...
Thanks and regards,
|
|
|
|
|
You might try this approach...
You can get the coordinates of each tab on the DrawItem event. If you could save those locations and sizes of each tab every time the tab control is drawn, then in the mousedown event you can identify which tab was clicked on by referring to your saved information.
Good Luck!
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
The way to do it is to iterate over the tab pages and for each one call TabControl.GetTabRect. If your mouse coordinate exists inside the returned rectange, set that tab to the selected tab.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi, I have a problem wiht a SQL Sentence, if I have got a field char(30) and this field of one table of my database have for example : "01/12/2005 10:12:25" my question is how can I do a selection if I want do a selection between 01/12/2005 to 31/12/2005 and show the result in a datagrid. I´m working with Sybase
I have tried:
Select * from Table where field between like "01/12/2005%" and
like "31/12/2005%"
Error
If I try
Select * from Table where field like "01/12/2005%"
The result is ok.
Any idea ?????? Any help ???? Any example ????
Thanks in advance.
Coloso
|
|
|
|
|
Hi,
try with the following method
select * from <--table name-->WHERE <--field name--> Between "01/12/2005 00:00:00" AND "31/12/2005 23:59:59";
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
Thank you for you help.
I have try your code and the sentence select all the data, more dates are selected that I need.
01/01/2005 ...... 31/12/2005
I have find the same data in othe field in my table of type TimeStamp (Sybase) and with this code.
SELECT * FROM BatchHeader where StartTime between '2005-12-01 00:00:00' and
'2005-12-31 23:59:59'
it´s work fine. Thank you for the clue.
Coloso
|
|
|
|
|
|
Hi,
There is no need to use like instead of this we can use between. In addition of date we have to use timestamp also. I think this might cleare you.
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
|
char fields will not order dates as you think - they will order them using a text search, not a date search, you must store the data in a date field of some sort.
|
|
|
|
|
You can do:
select * from table where cast(myColumn as dateTime) between '2005-12-1' and '2005-12-31'
but that's for mssql, i'm sure there must be convert function in sybase
|
|
|
|
|
Hi,
need some help here:
i would like to search for a group of pixels on an image, lets say the image is white of color, and has some red points on it, spread around the hole picture, now i would like to develop an application that can counts these dots. Later i want the user to select what he is looking for, dots, rectangles, circles,...
is this possible with GDI+ ? Or is there a library (free one please ) that i can use to start ? Or should i program the hole flow on myself
grtz & thx
|
|
|
|
|
Bitmap bmp; //obtain this however you like
int x;
int y;
for (x=0;x
|
|
|
|