473,769 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Difference between 'this.CreateGra phics()' and 'Graphics.FromH dc(hDC);'

Hi,
Please pity me, i am on a dial-up connection for the first time in 5
years :( !

Does anyone know how the resulting Graphics objects differ ...? What i
really mean is can someone explain it to me please?

A)
[DllImport("user 32.dll")] protected static extern IntPtr GetWindowDC
(IntPtr hWnd );
hDC = GetWindowDC(thi s.Handle);
g_dc = Graphics.FromHd c(hDC);

B)
Graphics g = this.CreateGrap hics();

You have my thanks and full attention,
James Randle.

Dec 4 '06 #1
8 12776
The code i am looking at (if this helps) is attached below (from
http://www.codeproject.com/cs/combob...ears_flat.asp).

In the WM_NC_PAINT message handler, a graphics object is already
created, but then SendPrintClient Msg() is called which seems to do the
same work again (in reverse - getting the hDC from
this.CreateGrap hics). Is this mad, or more likely, am i missing
something?

....

using System;
using System.Windows. Forms;
using System.Drawing;
using System.Drawing. Drawing2D;
using System.Runtime. InteropServices ;

namespace DrawFlat
{
[ToolboxBitmap(t ypeof(System.Wi ndows.Forms.Com boBox))]
public class FlatComboBox: ComboBox
{
#region ComboInfoHelper
internal class ComboInfoHelper
{
[DllImport("user 32")]
private static extern bool GetComboBoxInfo (IntPtr hwndCombo, ref
ComboBoxInfo info);

#region RECT struct
[StructLayout(La youtKind.Sequen tial)]
private struct RECT
{
public int Left;
public int Top;
public int Right;
public int Bottom;
}
#endregion

#region ComboBoxInfo Struct
[StructLayout(La youtKind.Sequen tial)]
private struct ComboBoxInfo
{
public int cbSize;
public RECT rcItem;
public RECT rcButton;
public IntPtr stateButton;
public IntPtr hwndCombo;
public IntPtr hwndEdit;
public IntPtr hwndList;
}
#endregion

public static int GetComboDropDow nWidth()
{
ComboBox cb = new ComboBox();
int width = GetComboDropDow nWidth(cb.Handl e);
cb.Dispose();
return width;
}
public static int GetComboDropDow nWidth(IntPtr handle)
{
ComboBoxInfo cbi = new ComboBoxInfo();
cbi.cbSize = Marshal.SizeOf( cbi);
GetComboBoxInfo (handle, ref cbi);
int width = cbi.rcButton.Ri ght - cbi.rcButton.Le ft;
return width;
}
}
#endregion

public const int WM_ERASEBKGND = 0x14;
public const int WM_PAINT = 0xF;
public const int WM_NC_PAINT = 0x85;
public const int WM_PRINTCLIENT = 0x318;
private static int DropDownButtonW idth = 17;

[DllImport("user 32.dll", EntryPoint="Sen dMessageA")]
public static extern int SendMessage (IntPtr hwnd, int wMsg, IntPtr
wParam, object lParam);

[DllImport("user 32")]
public static extern IntPtr GetWindowDC (IntPtr hWnd );

[DllImport("user 32")]
public static extern int ReleaseDC(IntPt r hWnd, IntPtr hDC );

static FlatComboBox()
{
DropDownButtonW idth = ComboInfoHelper .GetComboDropDo wnWidth() + 2;
}

public FlatComboBox()
: base()
{
this.SetStyle(C ontrolStyles.Do ubleBuffer, true);
}

protected override void OnSelectedValue Changed(EventAr gs e)
{
base.OnSelected ValueChanged (e);
this.Invalidate ();
}

protected override void WndProc(ref Message m)
{
if (this.DropDownS tyle == ComboBoxStyle.S imple)
{
base.WndProc(re f m);
return;
}

IntPtr hDC = IntPtr.Zero;
Graphics gdc = null;
switch (m.Msg)
{
case WM_NC_PAINT:
hDC = GetWindowDC(thi s.Handle);
gdc = Graphics.FromHd c(hDC);
SendMessage(thi s.Handle, WM_ERASEBKGND, hDC, 0);
SendPrintClient Msg(); // send to draw client area
PaintFlatContro lBorder(this, gdc);
m.Result = (IntPtr) 1; // indicate msg has been processed
ReleaseDC(m.HWn d, hDC);
gdc.Dispose();

break;
case WM_PAINT:
base.WndProc(re f m);
// flatten the border area again
hDC = GetWindowDC(thi s.Handle);
gdc = Graphics.FromHd c(hDC);
Pen p = new Pen((this.Enabl ed? BackColor:Syste mColors.Control ),
2);
gdc.DrawRectang le(p, new Rectangle(2, 2, this.Width-3,
this.Height-3));
PaintFlatDropDo wn(this, gdc);
PaintFlatContro lBorder(this, gdc);
ReleaseDC(m.HWn d, hDC);
gdc.Dispose();

break;
default:
base.WndProc(re f m);
break;
}
}
private void SendPrintClient Msg()
{
// We send this message for the control to redraw the client area
Graphics gClient = this.CreateGrap hics();
IntPtr ptrClientDC = gClient.GetHdc( );
SendMessage(thi s.Handle, WM_PRINTCLIENT, ptrClientDC, 0);
gClient.Release Hdc(ptrClientDC );
gClient.Dispose ();
}

private void PaintFlatContro lBorder(Control ctrl, Graphics g)
{
Rectangle rect = new Rectangle(0, 0, ctrl.Width, ctrl.Height);
if (ctrl.Focused == false || ctrl.Enabled == false )
ControlPaint.Dr awBorder(g, rect, SystemColors.Co ntrolDark,
ButtonBorderSty le.Solid);
else
ControlPaint.Dr awBorder(g, rect, Color.Black,
ButtonBorderSty le.Solid);
}
public static void PaintFlatDropDo wn(Control ctrl, Graphics g)
{
Rectangle rect = new Rectangle(ctrl. Width-DropDownButtonW idth, 0,
DropDownButtonW idth, ctrl.Height);
ControlPaint.Dr awComboButton(g , rect, ButtonState.Fla t);
}

protected override void OnLostFocus(Sys tem.EventArgs e)
{
base.OnLostFocu s(e);
this.Invalidate ();
}

protected override void OnGotFocus(Syst em.EventArgs e)
{
base.OnGotFocus (e);
this.Invalidate ();
}
protected override void OnResize(EventA rgs e)
{
base.OnResize (e);
this.Invalidate ();
}

}
}

Dec 4 '06 #2
"pigeonrand le" <pi**********@h otmail.comwrote in message
news:11******** **************@ 79g2000cws.goog legroups.com...
The code i am looking at (if this helps) is attached below (from
http://www.codeproject.com/cs/combob...ears_flat.asp).

In the WM_NC_PAINT message handler, a graphics object is already
created, but then SendPrintClient Msg() is called which seems to do the
same work again (in reverse - getting the hDC from
this.CreateGrap hics). Is this mad, or more likely, am i missing
something?
I don't know. The whole thing does look kind of odd to me...presumably , the
code is like this because some of the code was originally unmanaged? I
can't imagine writing C# code like this from scratch.

From http://msdn2.microsoft.com/en-us/library/ms535950.aspx it's apparent to
me that FromHdc does what you'd think: it just wraps a device context handle
with a Graphics object.

I don't know how CreateGraphics works, but presumably it calls either GetDC
or GetWindowDC. Okay, I admit it could call CreateDC but that seems less
likely for screen drawing. Whether it calls GetDC or GetWindowDC probably
depends on whether the Control and/or Form class always uses an "own DC" for
the window.

So yes, it does kind of look like the same DC may be getting handed back and
forth to multiple Graphics objects, and yes it does seem to me that would be
wasteful.

Ain't legacy code great? :)

Pete
Dec 4 '06 #3
CreateGraphics will get you a Graphics object based on the client area of
the window.

FromHdc using the handle from GetWindowDC will return a graphics object
based on the whole window including the non-client area. This DC is normally
only used by the system unless you want to do clever stuff like override the
non client drawing.

You should really use niether. See the GDI+ FAQ for how and when to get a
Graphics object.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"pigeonrand le" <pi**********@h otmail.comwrote in message
news:11******** **************@ 80g2000cwy.goog legroups.com...
Hi,
Please pity me, i am on a dial-up connection for the first time in 5
years :( !

Does anyone know how the resulting Graphics objects differ ...? What i
really mean is can someone explain it to me please?

A)
[DllImport("user 32.dll")] protected static extern IntPtr GetWindowDC
(IntPtr hWnd );
hDC = GetWindowDC(thi s.Handle);
g_dc = Graphics.FromHd c(hDC);

B)
Graphics g = this.CreateGrap hics();

You have my thanks and full attention,
James Randle.

Dec 4 '06 #4
Peter, Bob,

Thankyou both for your replies.

Bob,
If i might ask, why do you think the author of the above code used this
method? I am about to read the GDI+ FAQ, but are there some appropriate
questions i should be asking that would hasten my successful completion
of a similar control?

Bob Powell [MVP] wrote:
CreateGraphics will get you a Graphics object based on the client area of
the window.

FromHdc using the handle from GetWindowDC will return a graphics object
based on the whole window including the non-client area. This DC is normally
only used by the system unless you want to do clever stuff like override the
non client drawing.

You should really use niether. See the GDI+ FAQ for how and when to get a
Graphics object.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"pigeonrand le" <pi**********@h otmail.comwrote in message
news:11******** **************@ 80g2000cwy.goog legroups.com...
Hi,
Please pity me, i am on a dial-up connection for the first time in 5
years :( !

Does anyone know how the resulting Graphics objects differ ...? What i
really mean is can someone explain it to me please?

A)
[DllImport("user 32.dll")] protected static extern IntPtr GetWindowDC
(IntPtr hWnd );
hDC = GetWindowDC(thi s.Handle);
g_dc = Graphics.FromHd c(hDC);

B)
Graphics g = this.CreateGrap hics();

You have my thanks and full attention,
James Randle.
Dec 4 '06 #5
Bob (again!),
Hi. I've had a read through the GDI+ FAQ. Am i correct in the following
suggestions?
1) do WM_PAINT control painting in overridden OnPaint() event (after
base.OnPaint(e) )
2) WM_NC_PAINT still needs to be handled in WndProc as it uses 'fancy
stuff'

I just read that the combobox has no 'non-client' area so can i discard
WM_NC_PAINT all together?

Thanks and thanks again,
James Randle.
Bob Powell [MVP] wrote:
CreateGraphics will get you a Graphics object based on the client area of
the window.

FromHdc using the handle from GetWindowDC will return a graphics object
based on the whole window including the non-client area. This DC is normally
only used by the system unless you want to do clever stuff like override the
non client drawing.

You should really use niether. See the GDI+ FAQ for how and when to get a
Graphics object.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"pigeonrand le" <pi**********@h otmail.comwrote in message
news:11******** **************@ 80g2000cwy.goog legroups.com...
Hi,
Please pity me, i am on a dial-up connection for the first time in 5
years :( !

Does anyone know how the resulting Graphics objects differ ...? What i
really mean is can someone explain it to me please?

A)
[DllImport("user 32.dll")] protected static extern IntPtr GetWindowDC
(IntPtr hWnd );
hDC = GetWindowDC(thi s.Handle);
g_dc = Graphics.FromHd c(hDC);

B)
Graphics g = this.CreateGrap hics();

You have my thanks and full attention,
James Randle.
Dec 4 '06 #6
I just tried to call the drawing functions from an overriden OnPaint()
and the combo has reverted to its 3d appearance. Does this mean i have
to break the rules, or am i doing something wrong?

Arrggghhh!
James Randle.

pigeonrandle wrote:
Bob (again!),
Hi. I've had a read through the GDI+ FAQ. Am i correct in the following
suggestions?
1) do WM_PAINT control painting in overridden OnPaint() event (after
base.OnPaint(e) )
2) WM_NC_PAINT still needs to be handled in WndProc as it uses 'fancy
stuff'

I just read that the combobox has no 'non-client' area so can i discard
WM_NC_PAINT all together?

Thanks and thanks again,
James Randle.
Bob Powell [MVP] wrote:
CreateGraphics will get you a Graphics object based on the client area of
the window.

FromHdc using the handle from GetWindowDC will return a graphics object
based on the whole window including the non-client area. This DC is normally
only used by the system unless you want to do clever stuff like override the
non client drawing.

You should really use niether. See the GDI+ FAQ for how and when to get a
Graphics object.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"pigeonrand le" <pi**********@h otmail.comwrote in message
news:11******** **************@ 80g2000cwy.goog legroups.com...
Hi,
Please pity me, i am on a dial-up connection for the first time in 5
years :( !
>
Does anyone know how the resulting Graphics objects differ ...? What i
really mean is can someone explain it to me please?
>
A)
[DllImport("user 32.dll")] protected static extern IntPtr GetWindowDC
(IntPtr hWnd );
hDC = GetWindowDC(thi s.Handle);
g_dc = Graphics.FromHd c(hDC);
>
B)
Graphics g = this.CreateGrap hics();
>
You have my thanks and full attention,
James Randle.
>
Dec 4 '06 #7
Problem solved!

placing

this.SetStyle(C ontrolStyles.Do ubleBuffer | ControlStyles.U serPaint,
true);

in the constructor (UserPaint being the important bit) has restored the
missing paint event, and the draw flat button code can be called from
an overriden onpaint().

Thanks to anyone half writing a reply as i write mine, and again thanks
to Bob for pointing me in the right direction.

James Randle.

pigeonrandle wrote:
I just tried to call the drawing functions from an overriden OnPaint()
and the combo has reverted to its 3d appearance. Does this mean i have
to break the rules, or am i doing something wrong?

Arrggghhh!
James Randle.

pigeonrandle wrote:
Bob (again!),
Hi. I've had a read through the GDI+ FAQ. Am i correct in the following
suggestions?
1) do WM_PAINT control painting in overridden OnPaint() event (after
base.OnPaint(e) )
2) WM_NC_PAINT still needs to be handled in WndProc as it uses 'fancy
stuff'

I just read that the combobox has no 'non-client' area so can i discard
WM_NC_PAINT all together?

Thanks and thanks again,
James Randle.
Bob Powell [MVP] wrote:
CreateGraphics will get you a Graphics object based on the client area of
the window.
>
FromHdc using the handle from GetWindowDC will return a graphics object
based on the whole window including the non-client area. This DC is normally
only used by the system unless you want to do clever stuff like override the
non client drawing.
>
You should really use niether. See the GDI+ FAQ for how and when to get a
Graphics object.
>
--
Bob Powell [MVP]
Visual C#, System.Drawing
>
Ramuseco Limited .NET consulting
http://www.ramuseco.com
>
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
>
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
>
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
"pigeonrand le" <pi**********@h otmail.comwrote in message
news:11******** **************@ 80g2000cwy.goog legroups.com...
Hi,
Please pity me, i am on a dial-up connection for the first time in 5
years :( !

Does anyone know how the resulting Graphics objects differ ...? What i
really mean is can someone explain it to me please?

A)
[DllImport("user 32.dll")] protected static extern IntPtr GetWindowDC
(IntPtr hWnd );
hDC = GetWindowDC(thi s.Handle);
g_dc = Graphics.FromHd c(hDC);

B)
Graphics g = this.CreateGrap hics();

You have my thanks and full attention,
James Randle.
Dec 4 '06 #8
Err...Problem created.

Now the drop down is a solid black color, and none of the text is
displayed. I now see why the contrived method was used in the first
place ...
it allowed user painting of some of the control whilst letting the text
drawing continue as expected.

Is there a way to accomplish this properly? To be honest, i dont want
to have to write loads of drawing code (that is already there) just
because i want to draw a flat button and flat border which wouldnt
obscure the text anyway.

Any comments?
James Randle
pigeonrandle wrote:
Problem solved!

placing

this.SetStyle(C ontrolStyles.Do ubleBuffer | ControlStyles.U serPaint,
true);

in the constructor (UserPaint being the important bit) has restored the
missing paint event, and the draw flat button code can be called from
an overriden onpaint().

Thanks to anyone half writing a reply as i write mine, and again thanks
to Bob for pointing me in the right direction.

James Randle.

pigeonrandle wrote:
I just tried to call the drawing functions from an overriden OnPaint()
and the combo has reverted to its 3d appearance. Does this mean i have
to break the rules, or am i doing something wrong?

Arrggghhh!
James Randle.

pigeonrandle wrote:
Bob (again!),
Hi. I've had a read through the GDI+ FAQ. Am i correct in the following
suggestions?
1) do WM_PAINT control painting in overridden OnPaint() event (after
base.OnPaint(e) )
2) WM_NC_PAINT still needs to be handled in WndProc as it uses 'fancy
stuff'
>
I just read that the combobox has no 'non-client' area so can i discard
WM_NC_PAINT all together?
>
Thanks and thanks again,
James Randle.
>
>
Bob Powell [MVP] wrote:
CreateGraphics will get you a Graphics object based on the client area of
the window.

FromHdc using the handle from GetWindowDC will return a graphics object
based on the whole window including the non-client area. This DC is normally
only used by the system unless you want to do clever stuff like override the
non client drawing.

You should really use niether. See the GDI+ FAQ for how and when to get a
Graphics object.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.



"pigeonrand le" <pi**********@h otmail.comwrote in message
news:11******** **************@ 80g2000cwy.goog legroups.com...
Hi,
Please pity me, i am on a dial-up connection for the first time in 5
years :( !
>
Does anyone know how the resulting Graphics objects differ ...? What i
really mean is can someone explain it to me please?
>
A)
[DllImport("user 32.dll")] protected static extern IntPtr GetWindowDC
(IntPtr hWnd );
hDC = GetWindowDC(thi s.Handle);
g_dc = Graphics.FromHd c(hDC);
>
B)
Graphics g = this.CreateGrap hics();
>
You have my thanks and full attention,
James Randle.
>
Dec 4 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1272
by: Glenn | last post by:
We use GDI code to do some drawing with R2_MASKPEN (because there doesn't seem to be a GDI+ way of doing it). We're getting the HDC from a Graphics object passed in to the method. This works fine if the Graphics was created from a Form or Control, but when the Graphics object is created from an Image, the result is black. I tried using the Flush method before getting the HDC, but it only seems to be a solid black image. I also tried...
1
3791
by: Brian Keating EI9FXB | last post by:
Hello there, I've been playing with custom draw and am having a bit of difficulty, Namely the graphics function in this function throws invalid arg exception. Im pretty sure this is correct cause the rect part of the nmcd seems to be nonsence public int OnItemPrePaint(int idCtrl, ref Win32.NMCUSTOMDRAW nmcd) { using (Graphics gdc = Graphics.FromHdc(nmcd.hdc)){ gdc.ReleaseHdc(nmcd.hdc);
6
1583
by: Chuck Bowling | last post by:
Does the device context handle for a graphics device change during the lifetime of the underlying object? I'm asking because I ran across some code that stores the hDC in the class rather than call Graphics.GetHdc in the OnPaint method.
3
3416
by: Andreas | last post by:
Hi NG, i encountered a problem during developing some activex control with c#. I read an article that it is possible to expose windows forms as activex controls. So I tried it and it worked really great! Here is the link to the article: http://www.codeproject.com/cs/miscctrl/exposingdotnetcontrols.asp Testing the newly created control with the Testcontainer for ActiveX Controls showed no problems.
3
1803
by: Girish | last post by:
Hi , I am migrating from VC 6.0 to VC 7.0 with ( windows Control Lib option in vc dot net ) where I want to draw an image using StretchDIBits. I am not able to get the HDC of the Window. I tried using get_handel() which gives undefined value. Any help regarding this will be great. Thanx in Advance, G.Girish
8
1844
by: MyAlias | last post by:
Can't solve this CallBack returning structures Error message: An unhandled exception of type 'System.NullReferenceException' occurred in MyTest.exe Additional information: Object reference not set to an instance of an object. Situation skeleton: Private Declare Function EnumFontFamiliesASCII Lib "gdi32" Alias
6
2205
by: JoeC | last post by:
I have been working on my maze program and this line is failing: class space{ char gchar; graphic *gr; graphic *grDefault; player * play; bool seen;
2
4546
by: Lloyd Dupont | last post by:
In my .NET application I have some text rendered through GDI. It draws and print nicely. Now I would like to implement image export. So I create a new System.Drawing.Bitmap(width, height) then I create a Graphic g = Graphics.FromImage(bmp) then I use HDC hdc = g.GetHdc(); and use ExtTextOut ....
6
11833
by: NvrBst | last post by:
Hello. I can pInvoke "GetDC" with NULL or "IntPtr.Zero" and get the hDC for the entire screen. I can use the hDC for stuff like "GetPixel" and it works fine. When I try to do the... System.Drawing.Graphics myDC = System.Drawing.Graphics.FromHwnd(IntPtr.Zero); then a "myDC.GetHdc()" and use that with "GetPixel" it doesn't seem to
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10208
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9857
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8867
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7404
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5294
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.