|
You got the problem right on. I figured that would be the case but wanted to see for sure. Can it work the other way. I.e. you can draw on a panel, make the panel transparent and make it top of the z-order, and the drawning and things under the panel will still show?
Thanks so much for your help,
Eric
|
|
|
|
|
Hi
I work on a ASP.net Webapplication where a user can interact with the Microsoft.Ink.
I push a Windows.Forms.Control on the client. In this control i implement some methods. On the client i can use them by using javascript.
I got the following problem.
This is the Method in the UserControl that gives me a Base64String..
<br />
protected String SerializeInkData()<br />
{<br />
if(inko.Ink.Strokes.Count > 0) <br />
{<br />
byte[] inkDataBytes = inko.Ink.Save(PersistenceFormat.Gif);<br />
return Convert.ToBase64String(inkDataBytes);<br />
}<br />
<br />
return String.Empty;<br />
}<br />
And then give it back..
<br />
public string InkData <br />
{<br />
get <br />
{<br />
if (inko.Enabled) <br />
{<br />
return SerializeInkData();<br />
}<br />
else<br />
{<br />
return String.Empty;<br />
}<br />
}<br />
} <br />
Ok.. on the client I call the InkData Method by using javascript and save the Data into a hidden field. The client app is a asp.net site.
While the site is post back to the server i read the content of the hidden field and try to save it in a database.
The Column is from datatype IMAGE.
But it don't work. I think that i have to convert the string of the hidden field into an byte[] Array.. But how?
<br />
SqlConnection conn = new SqlConnection(connStr);<br />
<br />
conn.Open();<br />
<br />
string img = this.BodyInkData.Value;<br />
<br />
string insert = "INSERT INTO TestTable (Image) VALUES ('" + img + "')"; <br />
SqlCommand cmd = new SqlCommand(insert,conn);<br />
<br />
cmd.ExecuteNonQuery();<br />
<br />
conn.Close();<br />
How can I convert the string to a byte[] and save as BLOB into the Database?
Greeting from Germany
-- modified at 3:43 Wednesday 8th February, 2006
|
|
|
|
|
Hi All, quick question.
How do I create update files, so that when I made changes to the program, I don't have to uninstall the other one and replace it with the new one.
And what exactly do I need, cab files? And how does it work?
Thanx in advance.
|
|
|
|
|
When you make a setup-project you can say if the application has to be uninstalled first or not. The you generate a normal setup file (msi or cab).
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
Hey howzit!
Imagine my form: it has a Panel displaying an image, this image represents an paper application form (e.g. credit card application). My application places textbox's over various areas of this "paper form" to allow for user input.
I want to beable to zoom into this "paper form" i.e. all the controls must dynamically resize (incl. the text inside the textboxes) in a similar fashion to how MS Word zooms.
Can anyone help?
|
|
|
|
|
This zooming cand be achived by changing the text's size into all of your zoomed controls.
Assuming that you have a big label and a few text boxes over it, simply cahnge the label's text size and then the text boxes's text size.
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
Hi Vlad,
Thanks for your message.
I am not that clear about what you are saying, could you please give me an example with all the code, I would really appreciate it a lot?
|
|
|
|
|
e.g.:
Textbox.Font.Size = 12 * ScaleFactor;
Where ScaleFactor 1 is 100 Percent, and ScaleFactor 1.5 is 150 percent and so on.
You have to change the FontSize of every Control as said.
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
-- modified at 5:07 Wednesday 8th February, 2006
|
|
|
|
|
I want to develop a program that would permit me to sign on a computer at the logon screen. I assume that a windows service running with system permissions would be running in time to actually execute this, but I have no idea what I should research to interact with the logon screen.
All help would be appreciated!
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
Esmo2000 wrote: I have no idea what I should research to interact with the logon screen.
I'm not entirely sure if this is what you want, but allow me to introduce you to my friend GINA[^], the Graphical Identification and Authentication component. Crappy acronym, I know.
Share and enjoy.
Sean
|
|
|
|
|
Scenario:
Computer A has an instance of a windows form it wants to send to ComputerB. Computer A and B are running the same application and are on the same physical and logical network.
How might I best go about achieving this?
Thanks in advance
|
|
|
|
|
Question: any windows form or windows forms of a application you programmed? Do you want to control Computer A with the form copied to Computer B or do you want just to show the content?
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
Copmuter A and B are running the same application written by me. Computer A wants to "send" the form and its contents to Computer B where it is displayed in its exact same state as it left Computer A
|
|
|
|
|
I need to embved a quote(") into a string i tried \" but that doesn't remove the \ on runtime. I am trying to make a reuseable RegEx statement.
Regex rxFind = new Regex(szQuery);
When I run the code, szQuery contains the \" instead of just the ".
How do I fix this, or what is the better way to do this?
|
|
|
|
|
Embedding a quote into a string with \" does remove the \ on runtime, unless you are accepting input from the user, in which case, you do not need to escape the quote.
If you are trying to make a reusable Regex statement, you will always want to do:
Regex rxFind = new Regex(Regex.Escape(szQuery));
This makes sure that all characters that are part of the syntax of reguar expressions are translated so that they do not effect the expression.
Seperately, you could add more slashes (\\\" instead of \"), because they are significant in Regexes.
|
|
|
|
|
Is it possible to attach ToolTips for individual tabs of a TabControl?
I've tried setting ToolTips to TabPage and TabControl, but both attemps failed.
This works in Mozilla browser for both selected and unselected tabs.
The only solution I thinked up was to catch MouseMove events of a TabControl and look which tab is currently under mouse cursor. There's still a problem of how to show ToolTip (or something similar) statically. But I believe there's some cleaner and easier way.
|
|
|
|
|
You have to set the 'ShowToolTips' Property of the Tabcontrol to true before the Tooltips of the tabpages are shown.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
This doesn't work:
<br />
tabControl1.ShowToolTips = true;<br />
<br />
ToolTip tt = new ToolTip();<br />
<br />
tt.ShowAlways = true;<br />
<br />
tt.SetToolTip(tabControl1.TabPages[0], "1");<br />
tt.SetToolTip(tabControl1.TabPages[1], "2");<br />
<br />
tt.SetToolTip(tabControl1, "tabcontrol");<br />
ToolTip is shown on the tabs, but its the "tabcontrol" ToolTip. The "1" and "2" will show only when user moves cursor on the surface of the selected tab
Still thanks.
|
|
|
|
|
No you have to set the Tooltip directly:
tabpage1.ToolTiptext = "1";
tabpage2.ToolTiptext = "2";
tabcontrol1.ShowTooltips = true;
Then it should work.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
I'm dummy, thanks a lot!
|
|
|
|
|
Can anyone tell me why this isn't animating the window? It was doing it earlier but then it stopped for some reason
[DllImport("user32.dll")]<br />
static extern bool AnimateWindow(IntPtr hwnd, uint dwTime, uint dwFlags);<br />
<br />
enum AnimateWindowFlags : uint<br />
{<br />
AW_HOR_POSITIVE = 0x00000001,<br />
AW_HOR_NEGATIVE = 0x00000002,<br />
AW_VER_POSITIVE = 0x00000004,<br />
AW_VER_NEGATIVE = 0x00000008,<br />
AW_CENTER = 0x00000010,<br />
AW_HIDE = 0x00010000,<br />
AW_ACTIVATE = 0x00020000,<br />
AW_SLIDE = 0x00040000,<br />
AW_BLEND = 0x00080000<br />
}<br />
<br />
...<br />
<br />
[STAThread]<br />
static void Main()<br />
{<br />
Application.EnableVisualStyles();<br />
Application.SetCompatibleTextRenderingDefault(false);<br />
<br />
Main_Form main = new Main_Form();<br />
<br />
AnimateWindow(main.Handle, 250, (uint)AnimateWindowFlags.AW_VER_NEGATIVE |<br />
(uint)AnimateWindowFlags.AW_CENTER);<br />
<br />
Application.Run(main);<br />
}
Any help is appreciated.
|
|
|
|
|
Try calling AnimateWindow from the constructor of Main_Form
[DllImport("user32.dll")]
static extern bool AnimateWindow(IntPtr hwnd, uint dwTime, uint dwFlags);
enum AnimateWindowFlags : uint
{
AW_HOR_POSITIVE = 0x00000001,
AW_HOR_NEGATIVE = 0x00000002,
AW_VER_POSITIVE = 0x00000004,
AW_VER_NEGATIVE = 0x00000008,
AW_CENTER = 0x00000010,
AW_HIDE = 0x00010000,
AW_ACTIVATE = 0x00020000,
AW_SLIDE = 0x00040000,
AW_BLEND = 0x00080000
}
public Main_Form ()
{
...
AnimateWindow(this.Handle, 250, (uint)AnimateWindowFlags.AW_VER_NEGATIVE | (uint)AnimateWindowFlags.AW_CENTER);
...
}
|
|
|
|
|
That works, but only if I put it before InitializeComponent();
Which makes it animate but the form doesn’t start in the proper position because InitializeComponent(); hasn't been called yet
It's not that big of a deal anyway. Just weird that it would work and then decide not to Probably something I did
Thanks anyway,
Sean
|
|
|
|
|
That is weird.
For me, it works both before and after InitializeComponent();
To get around it not starting in the proper position (at least in .net 2.0) you can do something like this:
public Form1()
{
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
AnimateWindow(this.Handle, 250, (uint)AnimateWindowFlags.AW_VER_NEGATIVE | (uint)AnimateWindowFlags.AW_CENTER);
InitializeComponent();
}
|
|
|
|
|
I am using RegEx to find a section of a html document. The document can change, but the format is always the same.
I need RegEx to pull out:
>Name:VisualStudio
Then pull out VisualStudio (VisualStudio is a part of the page that may change)
Is there a way I can do this by passing strings to a function?
Thanks for any, and all help!
|
|
|
|