|
dodoxor wrote: I want to use it and its components(like a button control or a textlabel) in Myclass. For example i want that func() of myclass can modify a textlabel of camlive.h.
The buttons and labels, generally all controls, are private members by default. Change it to public.
dodoxor wrote: When i try to make a new object of class Camlive( Camlive^ cml in Myclass, it returns a compile error.
How can i do?
<br />
Camlive^ cml = gcnew Camlive();<br />
cml->ShowDialog();
P.S: you should include the Camlive.h header at the top of your class.
#include "Camlive.h"
|
|
|
|
|
I try but it returns some compiler errors...
#ifndef CAMOBJ_H
#define CAMOBJ_H
#include "Camlive.h"
//other include..
#define WIDTH (100)
#define HEIGHT (100)
class Camobj
{
public:
Camobj();
~Camobj(void);
void capture(void);
private:
camaddr_t camaddr;
Camlive^ cml;///compiler error
};
#endif
And in the camobj.cpp
#include "stdafx.h"
#include "Camobj.h"
using namespace System;
using namespace System::IO;
Camobj::Camobj()
{
cml=new Camlive();//compiler error
}
Camobj::~Camobj(void){
...
}
The compiler errors are:
...\Camobj.h(56) : error C2143: syntax error : missing ';' before '^'
...\Camobj.h(56) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...\Camobj.h(56) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...\Camobj.h(56) : error C3265: cannot declare a managed 'cml' in an unmanaged 'Camobj'
.\Camobj.cpp(15) : error C2065: 'cml' : undeclared identifier
.\Camobj.cpp(15) : error C2061: syntax error : identifier 'Camlive'
How can i relsolve it?
Thanks regards.
|
|
|
|
|
Hi Guys,
I am developing website that has button controls. When browsing it thru windows xp IE6 or IE7 the view is correct but when browsing it thru mac safari the button will show even I changed the properties to "transparent".
If you encountered this kind of issue I am hoping that you'll gonna share it with me.
Thanks in advance Guys.
Note: This message was mistakenly shared in this category
-- modified at 10:10 Monday 21st May, 2007
hifiger2004
|
|
|
|
|
Hi,
I am working on a project in Windows Forms VS 2005 .I want to use the report viewer control in this. I got some information on the net and implemented it in a sample project. It works absolutely fine.
I tried implementing it the same way in my project, it does not work.
What i am doin is i am adding a data source. On clicking on "Object" icon in data source wizard the assembly should be visible. But it doesn't appear in my final project. I tried finding out the difference in settings between the 2 projects.
In the references options of the project,in "Configuration properties", in "General" suboption the "Common lanuguage runtime support" option were different.
In the project in which the report viewer control works fine, the
"Common lanuguage runtime support" option is selected is ::
Pure MSIL Common Language Runtime Support(/clr::pure)
In my project I need to make is as
Common Language Runtime Support(/clr)
because I am using Win32 dlls in my project.
Please let me know what changes have to be made so that I ma able to view the assemblies in the wizard.
Thanx in advance.
shraddha
|
|
|
|
|
Hello,
I have a windows application. After exiting the application, I also want to kill the exe running. How to do this?
Please reply. Its urgent.
Thanks in advanced
Nana
|
|
|
|
|
Don't double post. I answered you in c# forum
|
|
|
|
|
Hi Friends,
I am using the following methods to bind the windows.combobox control. In this screen how to insert a value to 0 position of the list.
cboKeyword.DataSource = dsResult.Tables["tmpTable"];
cboKeyword.DisplayMember = "ProductKeyword";
cboKeyword.ValueMember = "PortalProductMasterID";
Keyword k = new Keyword();
k.KeywordID = "";
k.KeywordName = "<-Select Keyword->";
cboKeyword.Items.Insert(0, k);
It is not working.
Please Help
Thanks in Advance
Rameshkumar Thirumalaisamy
|
|
|
|
|
hi,
it seem that you are binding two different types to a single combobox.
first you bind the "tmpTable" with the columns "ProductKeyword" and "PortalProductMasterID" then you bind an object "Keyword". but from the code you provided, i don't see any similarity between the two - "tmpTable" and "Keyword". your existing "Keyword" class doesn't contain the properties you are trying to bind. what you should do is make the class "Keyword" comparable to the table you are trying to bind, i.e. add the properties "ProductKeyword" and "PortalProductMasterID" to you existing class - "Keyword".
hope this helps
reagards
|
|
|
|
|
Please Check It
cboKeyWord.Items.Add( new ListItem("<-Select KeyWord>-", "0"));
|
|
|
|
|
Hello All,
I want to catch scroll event of a list box in C#. I want to use two list box, and when one is scrolled the another should automatically be scrolled. What should I do for that.
Thanks.
|
|
|
|
|
Hallo,
I am trying to do the same thing. Did you manage to figure this out?
Thanks
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
Hello smyer,
First you made your own scrolling listbox using this code :
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel;
using System.Runtime.InteropServices;
namespace myscrollList
{
class scrollList : System.Windows.Forms.ListBox
{
[Category("Action")]
//public event ScrollEventHandler Scroll = null;
private const int WM_HSCROLL = 0x114;
private const int WM_VSCROLL = 0x115;
public event ScrollEventHandler OnHorizontalScroll;
public event ScrollEventHandler OnVerticalScroll;
private const int SB_LINEUP = 0;
private const int SB_LINELEFT = 0;
private const int SB_LINEDOWN = 1;
private const int SB_LINERIGHT = 1;
private const int SB_PAGEUP = 2;
private const int SB_PAGELEFT = 2;
private const int SB_PAGEDOWN = 3;
private const int SB_PAGERIGHT = 3;
private const int SB_THUMBPOSITION = 4;
private const int SB_THUMBTRACK = 5;
private const int SB_PAGETOP = 6;
private const int SB_LEFT = 6;
private const int SB_PAGEBOTTOM = 7;
private const int SB_RIGHT = 7;
private const int SB_ENDSCROLL = 8;
private const int SIF_TRACKPOS = 0x10;
private const int SIF_RANGE = 0x1;
private const int SIF_POS = 0x4;
private const int SIF_PAGE = 0x2;
private const int SIF_ALL = SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS;
[DllImport("user32.dll", SetLastError = true)]
private static extern int GetScrollInfo(
IntPtr hWnd, int n, ref ScrollInfoStruct lpScrollInfo);
private struct ScrollInfoStruct
{
public int cbSize;
public int fMask;
public int nMin;
public int nMax;
public int nPage;
public int nPos;
public int nTrackPos;
}
protected override void WndProc(ref System.Windows.Forms.Message msg)
{
if (msg.Msg == WM_HSCROLL)
{
if (OnHorizontalScroll != null)
{
ScrollInfoStruct si = new ScrollInfoStruct();
si.fMask = SIF_ALL;
si.cbSize = Marshal.SizeOf(si);
GetScrollInfo(msg.HWnd, 0, ref si);
if (msg.WParam.ToInt32() == SB_ENDSCROLL)
{
ScrollEventArgs sargs = new ScrollEventArgs(
ScrollEventType.EndScroll,
si.nPos);
OnHorizontalScroll(this, sargs);
}
}
}
if (msg.Msg == WM_VSCROLL)
{
if (OnVerticalScroll != null)
{
ScrollInfoStruct si = new ScrollInfoStruct();
si.fMask = SIF_ALL;
si.cbSize = Marshal.SizeOf(si);
GetScrollInfo(msg.HWnd, 0, ref si);
if (msg.WParam.ToInt32() == SB_ENDSCROLL)
{
ScrollEventArgs sargs = new ScrollEventArgs(
ScrollEventType.EndScroll,
si.nPos);
OnVerticalScroll(this, sargs);
}
}
}
base.WndProc(ref msg);
}
private void InitializeComponent()
{
this.SuspendLayout();
//
// scrolled
//
this.Size = new System.Drawing.Size(120, 95);
this.ResumeLayout(false);
}
}
}
After this .........
Drag your listbox on windows forms and than sync two listbox together using this.......
private void scrollList1_OnVerticalScroll(object sender, ScrollEventArgs e)
{
scrollList2.TopIndex = scrollList1.TopIndex;
}
private void scrollList2_OnVerticalScroll(object sender, ScrollEventArgs e)
{
scrollList1.TopIndex = scrollList2.TopIndex;
}
I hope this will work..........
nav_smec
|
|
|
|
|
Thanks
Will try this
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
Hi There,
I'm having some trouble with CheckedListBoxes in my application. The application is written in C# in .NET 1.1. It's multi-tabbed, and on each tab there is an instance of my user control, which contains 6 combo's and 6 CheckedListBoxes.
The control works fine when you stay on a single tab, however when I switch tab and come back again, all the CheckedListBoxes still have their data, but they lose the CheckedItems collection, so they are all unchecked.
Has anyone come across this problem?
Thanks in advance,
modified 30-May-24 18:02pm.
|
|
|
|
|
Jim,
(I could wait til you get back from lunch.. but I think the code project needs to know as well )
I found the problem, its a known bug in .NET 1.1.
Documented here: http://support.microsoft.com/kb/833033
The problem only occurs when the checked list box is bound to a data table.
It looks like Microsoft's only solution is to maintain a collection of checked items and refill on tab switch (rubbish!). But I guess that is what we're going to have to do...
Rob.
|
|
|
|
|
I think when u change the Tab Button then u Fill the The Combo with DataBase, So u lost urs Current Status/View State
|
|
|
|
|
Thanks to reply,
But my question is not related to database . I only want scroll listbox together at same time. If i scroll first listbox than second listbox automatically scroll together.
Thanks ,
Naveen Jatav
|
|
|
|
|
|
Your question has nothing to do with windows forms. Please don't spam the site.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Regsvr32 only works with COM DLLs. If it can't find DllRegisterServer then it isn't a COM DLL and doesn't need to be registered.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi,
how to give links to the items moving in a ticker.
Actualy i am fetching the items from a database and showing it in a label control and using timer control i am schrolling it.
but i want to show like when i move the mouse on the item it will display as a link,if i click this link it will open one windows page and show the details of the item.
nilima
|
|
|
|
|
No control does this, but it's easy enough to write one. Just set up a control that contains the text, and keeps drawing itself scrolling, then capture the click event, work out what's been clicked, and then based on that, open another form.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i am creating an admin section of Media Schedular Application which shows schedules in schedule controls in detail section and the header contains a ruler bar to show the scale in minutes. this schedular shows records for one month and of all four quarters of screen.
i have two panel controls named pnlHeader (no scroll bars) and pnlDetail (both vertical and horizontal scroll bars). when a user scrolls vertically up and down on pnlDetail, there is no effect on pnlHeader but when user will scroll horizontly on pnlDetail the other panel named pnlHeader will also scroll accordingly.
*************************
SetNewGoal:
while (GoalNotAchieved){}
goto SetNewGoal;
*************************
|
|
|
|
|
I have Created a Procedure , i need to intergrate it with vb6, i know that one. i want to insert these fields into Property table and some of them i want to set them here in the Procedure, help to do that and assigning the value of textbox's in vb6 to the variable in a this Procedure. e.g num_key= txtnumkey. Here is my procedure but i did not finish it because of that part.
Create Procedure prcinserting @Num_key varchar(10),@Extension int,@Cell_ID int,
@Actual_Extent float,@Lis_key varchar(50), @Func_key varchar(8)
,@Active bit,@Add_date datetime,@Add_User_ID int,@Spatial_ADD_Date datetime
,@Rateable bit,Non_Discreet_Valid bit
with recompile
insert into Propery(Num_key,Extension,Cell_ID,Actual_Extent,Lis_key,Func_key,Active,Add_date,Add_User_ID,Spatial_ADD_Date,Rateable,Non_Discreet_Valid,)
values ()
Vuyiswa
|
|
|
|
|
Hi friends,
As per requirement I am supposed to place data grid on windows form which have a Filter creteria..My problem is that I have three columns in a grid and filter functionality have to be provided on the basis of contents in all the three columns..so i have to place three comboboxes below column header(one for each column..so that user can choose value from combobox specific to that column and perform filtering).I m facing a problem with placing Comboboxes at required position..i.e below column header,so ithat it look like that three comboboxes are at first row of grid..Reply Soon..plz
|
|
|
|