|
Good point (& thanks for the follow up). My version is "MS Access 2002 (10.6771.6847) SP3", which I believe is the "Office XP" version. Seems like that makes it two versions ago, I normally keep to VB as there is less of that sort of stuff (oops, notwithstanding that big one from VB6 to VB.NET nine or so years ago - my how time flies!). At that, I'm still using the .NET Studio 2003 & 2005 versions (and still keeping a VB6 machine alive, for that matter).
But you are right, as one ponders a "product" even a shareware one, version compatibility is a consideration and finding a break in the object model is certainly enough to "ruin one's day". I will post again if/when I have useful further info that warrants it.
Best Regards, John A
|
|
|
|
|
Hi,
I have created a macro through which I am able to read the above mentioned property.
but to get all property I had to call the macro from each form.
Is there any easier way to achieve the same result easily which will loop through all the forms and get all controls property like database documenter does.
Anyone has any idea about how database documenter works like which tables it queries to get all the database related information.
I got a helpfull query :
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left$([Name],1)<>"~") AND
(MSysObjects.Type)=-32768 ORDER BY MSysObjects.Name;
which retrieves all the forms in a particular database but it doesn't get called from .net application.
I am getting Exception:
Record(s) cannot be read; no read permission on 'MsysObjects'.
I tried to resolved this using suggestion provided here :
http://www.justskins.com/forums/trouble-accessing-the-ms-59921.html
but I do not find 'MsysObjects' in object list.
Any help provided is much appreciated.
It's urgent.
Thanks
Ruchika,
ruchika.sharma83@yahoo.com
|
|
|
|
|
In C#, if I make a transparent windows form using transparency key colored "control", then on clicking anywhere on screen(while application is in focus), transfers focus of the app to the one behind it, which is normal behaviour.
If I want the application to retain the focus, is it possible to do anyhow ?
|
|
|
|
|
Use a timer to set focus? Maybe P/Invoke to SetWindowFocus?
|
|
|
|
|
I do not want the window to loose focus at all, because user will be drawing on this transparent window.
Isn't there a straightforward way to do it, than to hack/tweak things?
|
|
|
|
|
Did you try setting the topmost property to true?
|
|
|
|
|
Yes, I tried that. It is not effective.
|
|
|
|
|
|
How about skipping all this garbage and taking a screen shot and drawing on that instead. No need to worry about transparency and mouse clicks going to the wrong form at all.
|
|
|
|
|
Yes, that's an option I am considering right now.
But if I could make it draw directly on screen it would have been much more better.
Thanks,
Parth
|
|
|
|
|
I got this from MSDN before
[DllImport("user32.dll")]
private extern static IntPtr SetActiveWindow(IntPtr handle);
private const int WM_ACTIVATE = 6;
private const int WA_INACTIVE = 0;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_ACTIVATE)
{
if (((int)m.WParam & 0xFFFF) != WA_INACTIVE)
{
if (m.LParam != IntPtr.Zero)
{
SetActiveWindow(m.LParam);
}
else
{
SetActiveWindow(IntPtr.Zero);
}
}
}
base.WndProc(ref m);
}
I cant find the link for it though so I just found it in my own code
found the link[^]
modified on Friday, June 19, 2009 3:39 PM
|
|
|
|
|
This does not work. I tried this one as well as the
[DllImport("user32", CharSet = CharSet.Auto)]<br />
private extern static int SendMessage(<br />
IntPtr handle, int msg, int wParam, IntPtr lParam);<br />
<br />
[DllImport("user32", CharSet = CharSet.Auto)]<br />
private extern static int PostMessage(<br />
IntPtr handle, int msg, int wParam, IntPtr lParam);<br />
<br />
private const int WM_ACTIVATE = 0x006;<br />
private const int WM_ACTIVATEAPP = 0x01C;<br />
private const int WM_NCACTIVATE = 0x086;<br />
<br />
<br />
protected override void WndProc(ref Message m)<br />
{<br />
<br />
if (m.Msg == WM_NCACTIVATE)<br />
{<br />
<br />
if (((int)m.WParam) == 0)<br />
{<br />
xyz += m.Msg + " ";<br />
SendMessage(this.Handle, WM_NCACTIVATE, 1, IntPtr.Zero);<br />
<br />
}<br />
<br />
}<br />
else if (m.Msg == WM_ACTIVATEAPP)<br />
{<br />
<br />
if ((int)m.WParam == 0)<br />
{<br />
xyz += m.Msg + " ";<br />
PostMessage(this.Handle, WM_NCACTIVATE, 0, IntPtr.Zero);<br />
}<br />
}<br />
<br />
base.WndProc(ref m);<br />
}
code.
Later code actually does the reverse of what I want, but still it does not work.
Neither works.
|
|
|
|
|
My config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="sunshine" value="125" />
<add key="moonshine" value="50" />
<add key="seashine" value="10" />
</appSettings>
<Settings2>
<add key="persistent" value="0" />
<add key="smooth" value="1" />
</Settings2>
</configuration>
I can read/write settings into <appSettings> but don´t know how can i read/write from <Settings2> .... and if i can create new sections like <SettingsN>
...
I´m using System.Configuration but only could read/write into the default section named <appSettings>... perhaps someone can give me a hand or point me to the right direction, thanks in advance.
|
|
|
|
|
Zeokat wrote: I´m using System.Configuration but only could read/write into the default section named <appsettings>...
System.Configuration only exposes methods which for the predefined section (i.e. appsettings).
For your purpose, you should rather consider it as a normal xml file and do the read/write.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Ok, thanks for the informations...
I already thougth into write my own config file reader writer, but want to be sure firts that built-in class not allow me do that
|
|
|
|
|
As modifying configuration files directly can be very dangerous. You should also take a look at How to: Create Custom Configuration Sections[^].
There are also loads of articles, which you might find easier to understand. Just Google for Custom Configuration Section
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
Good Evening All
Am amazed that i cant use the Replace Function , its Probably the long that i had.
i have the Following code
String Username = "Vuyiswa";
String Password = "secret";
String strBody = @"<p>Thank you for using !obooking System <br><br> Username:(Username)<br><br>Password:(Password)<br<br>Kind Regards !oBooking</p>";
strBody = Regex.Replace(strBody,Username,"(Username)");
strBody = Regex.Replace(strBody, Password, "(Password)");
Response.Write(strBody);
i have tried the Normal replace Function, but the Variables are not returned with the Variables values.
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
string username = "user1";
string password = "pass1";
string body = "something with a (username) and a (password)";
body = body.Replace("(username)", username);
body = body.Replace("(password)", password);
you saying that does not work?
you can also do...
string body = "something with a " + username + " and a " + password;
or...
string body = string.Format("something with a {0} and a {1}", username, password);
...I think your regex could have something to do with the brackets which are used in regular expression to specify a group, but I'm not sure about that
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Thanks
i used it this way
string Username = "Vuyiswa";
string Password = "secret";
string strBody = @"<p>Thank you for using !obooking System <br><br> Username:(Username)<br><br>Password:(Password)<br<br>Kind Regards !oBooking</p>";
strBody = strBody.Replace("(Username)", Username).Replace("(Password)", Password);
Response.Write(strBody)
but what is the Difference between this
strBody.Replace("(Username)",Username);
strBody.Replace("(Password)",Password);
and this working code
strBody = strBody.Replace("(Username)", Username).Replace("(Password)", Password);
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
string.Replace creates and returns a new string, so do strBody.Replace(...) ;
that also is why the second way does work.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Hi,
nothing gets replaced, since there is no match: "Vuyiswa" and "secret" are not present in the original strBody.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
That means the Replace Function intellisense is misleading because it says
strBody.Replace(char oldchar,char newChar)
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
that is just one of the functions signatures, the other is with string types instead of char types
your intellisense should show multiple signatures available that you can cycle through with the Up/Down arrow keys
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I see
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|