|
Enobong Adahada wrote: i am completely new here
Congrats
Enobong Adahada wrote: what is RedFive labs?
RedFive Labs[^]
Try Google more often.
[Edit]
Ok, I can tell you are new here.
Please check out the link at the top entitled 'how to get an answer to your question'.
People here will not do work for you based off your vague requirements, and even if you do state requirements properly chances are you still won't receive free work.
Please post specific problems that are part of your project, we won't start or finish it for you but we will help you along the way.
Please buy a book on the topic you wish to learn and begin studying/learning it. You cannot become a developer overnight.
[/Edit]
|
|
|
|
|
Ok, I have a control with custom painting being done. I have a back buffer bitmap that I draw to then OnPaint, I paint the entire bitmap to the control. There are sometimes with certain sections of the bitmap are updated and all I need to do is update those sections on the control. So what I'm doing so far is:
pseudocode
void UpdateArea(Rectangle rect)
{
Invalidate(rect);
}
void OnPaint(object o, PaintEventArgs e)
{
e.Graphics.DrawImage(BackBuffer, e.ClipRectangle, e.ClipRectangle, GraphicsUnit.Pixel);
}
Ok, that's not actual code, but it's close enough. When I call UpdateArea, the area which I changed is successfully reflected on the screen. However, once UpdateArea is called, the control will only redraw that section from there on out. Everything outside of the region becomes garbage. The Bitmap itself is fine because if I call Invalidate(), the entire bitmap draws just fine. What am I missing that would prevent the rest of the bitmap from being draw properly?
|
|
|
|
|
Hi,
I don't see anything wrong.
Are you sure you represented the actual code close enough?
or are you having some Graphics.Transforms you did not show?
tips for debugging:
- add logging (to file or to Console) to both UpdateArea and OnPaint; then check each rect that appears in UpdateArea
- create a second Panel ( or form or whatever) and inside the original OnPaint paint the entire bitmap to the entire second Panel, so you can see real-time whether your BackBuffer is still intact.
BTW: simplifying code shown may be a bad idea: something does not work the way you expect, what makes you think you can simplify your code reliably without hiding the problem?
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Actually I just found my problem! When I go to call LockBits, I initially lock the entire bitmap, which apparently does something to the data. if I lock just the portion of the bitmap that I'm updating, all is fine and well.
|
|
|
|
|
Hi.
I'm using LINQ to SQL. I wanna create a database with LINQ but the following exception has occurred :
Illegal characters in path.
This is my code :
using (RezaRestaurant.SQL.DataClasses1DataContext dbc = new RezaRestaurant.SQL.DataClasses1DataContext())
if (!dbc.DatabaseExists())
dbc.CreateDatabase();
BTW : I was using UFT8 characters in database's tables, like this : اقلام_فروخته_شده
Could you please guide me ?
Thanks.
|
|
|
|
|
Illegal characters in path usually referrs to a file system path specification. Apparently, you're trying to check if a database exists in a certain place in the filesystem, but have built an illegal path specification.
|
|
|
|
|
Thanks Dave Kreskowiak.
So , How can I resolve it ?
|
|
|
|
|
Uhhh...make sure the path you built is legal?? What does the code look like that built the path you're using?
|
|
|
|
|
Dave Kreskowiak wrote: Uhhh...make sure the path you built is legal??
Well, I've tested it in root of D drive , but the exception has occurred again !
The database file (*.mdf) is beside of application's exe file in SQL folder.
With following code , I'm trying to create a new database.
public static string DBFolder = Application.StartupPath + "\\SQL\\";
private void MainForm_Load(object sender, EventArgs e)
{
if (!Directory.Exists(StaticVariables.DBFolder))
Directory.CreateDirectory(StaticVariables.DBFolder);
using (RezaRestaurant.SQL.DataClasses1DataContext dbc = new RezaRestaurant.SQL.DataClasses1DataContext())
if (!dbc.DatabaseExists())
dbc.CreateDatabase();
}
|
|
|
|
|
Youre code sure could use some work. I hate methods that don't take parameters when the name suggests they should.
The problem isn't in the first five lines you posted, up until the second if statement. So now you move on to the next lines. What does the code for dbc.DatabaseExists() and dbc.CreateDatabase() look like?
|
|
|
|
|
Hi,
I publish a setup with click one Installation,
and when i'm trying to install it i get:
application validation did not succeed.
What i'm doing wrong????
|
|
|
|
|
How are we supposed to answer? You have provided no details of what you have done or how you've done it.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: How are we supposed to answer? You have provided no details of what you have done or how you've done it.
I worket wxactly like this[]
Do you need more details?
|
|
|
|
|
i want to use a landscape setup in my c# crystal report app.
|
|
|
|
|
Ok, I can tell you are new here.
Please check out the link at the top entitled 'how to get an answer to your question'.
People here will not do work for you based off your vague requirements, and even if you do state requirements properly chances are you still won't receive free work.
Please post specific problems that are part of your project, we won't start or finish it for you but we will help you along the way.
Please buy a book on the topic you wish to learn and begin studying/learning it. You cannot become a developer overnight.
|
|
|
|
|
And I just want to have a million dollars. 
|
|
|
|
|
i have multiple reports in my c# app. i want to view them all using a single report viewer (crystal reports)
|
|
|
|
|
Ok, I can tell you are new here.
Please check out the link at the top entitled 'how to get an answer to your question'.
People here will not do work for you based off your vague requirements, and even if you do state requirements properly chances are you still won't receive free work.
Please post specific problems that are part of your project, we won't start or finish it for you but we will help you along the way.
Please buy a book on the topic you wish to learn and begin studying/learning it. You cannot become a developer overnight.
|
|
|
|
|
Hi all,
Please can someone tell me how to start mobile apps.
i want to write a program to make calls using my pc, where do i start from.
i am new in this area.
|
|
|
|
|
First you need to understand and clarify what you want.
Enobong Adahada wrote: how to start mobile apps.
Enobong Adahada wrote: make calls using my pc
These are two separate environments
only two letters away from being an asset
|
|
|
|
|
Which mobiles? Mobile phones have an OS and not all will support your .net code. If you are aiming at Windows based mobiles, look in to .Net compact framework. There is a plenty of documentation about that on MSDN. If you are aiming at Symbian based mobiles, you can make .net application again and deploy them using RedFiveLabs.
Try out some basic stuff to begin with through the tutorials available.
As far as making calls from PC is concerned, I don't see much relation of that with Mobile development.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Ok, I can tell you are new here.
Please check out the link at the top entitled 'how to get an answer to your question'.
People here will not do work for you based off your vague requirements, and even if you do state requirements properly chances are you still won't receive free work.
Please post specific problems that are part of your project, we won't start or finish it for you but we will help you along the way.
Please buy a book on the topic you wish to learn and begin studying/learning it. You cannot become a developer overnight.
|
|
|
|
|
Hi
the eaziest option i know is sending at commands through the serialport to ur phone,firstly check if ur phone is at compatible then find the at command set for the phone and u can begin from there.
i can do all things......
|
|
|
|
|
Hello,
I've wrote UserControl where one of properties is collection. Item of collection is object of type GroupClass. Code below:
[Serializable]
public class GroupClass
{
private string pGrpupName;
private Control pGroupControl;
[Category("Group")]
[Description("Definition")]
public string GroupName
{
get { return pGrpupName; }
set { pGrpupName = value; }
}
[Category("Group")]
[Description("Definition")]
[Browsable(false)]
public Control GroupControl
{
get { return pGroupControl; }
set { pGroupControl = value; }
}
}
And after when I add item to collection also groupbox should show on UC. I've override some methods in my Collection. It works. But it doesn't when I try to remove item in designer. Groupbox is still there and method RemoveItem doesn't works
public class WRListClass<T> : Collection<T>
{
public event EventHandler<ItemInsertedArgs<T>> BeforeItemInserted;
public event EventHandler<ItemRemovedArgs<T>> BeforeItemRemoved;
public event EventHandler<ItemSetArgs<T>> BeforeItemSet;
public event EventHandler<ItemInsertedArgs<T>> AfterItemInserted;
public event EventHandler<ItemRemovedArgs<T>> AfterItemRemoved;
public event EventHandler<ItemSetArgs<T>> AfterItemSet;
public event EventHandler ListChanged;
protected override void InsertItem(int index, T item)
{
EventHandler<ItemInsertedArgs<T>> beforehandler = BeforeItemInserted;
EventHandler<ItemInsertedArgs<T>> afterhandler = AfterItemInserted;
EventHandler handlerListChanged = ListChanged;
if (beforehandler != null)
{
beforehandler(this, new ItemInsertedArgs<T>(index, item));
}
base.InsertItem(index, item);
if (afterhandler != null)
{
afterhandler(this, new ItemInsertedArgs<T>(index, item));
}
if (handlerListChanged != null)
{
handlerListChanged(this, null);
}
}
public new bool Remove(T item)
{
return base.Remove(item);
}
public new void RemoveAt(int index)
{
base.RemoveAt(index);
}
protected override void RemoveItem(int index)
{
EventHandler<ItemRemovedArgs<T>> beforehandler = BeforeItemRemoved;
EventHandler<ItemRemovedArgs<T>> afterhandler = AfterItemRemoved;
EventHandler handlerListChanged = ListChanged;
T item = default(T);
if (index >= 0)
item = this[index];
WRListClass<T> old = this;
if (beforehandler != null)
{
beforehandler(this, new ItemRemovedArgs<T>(index, item));
}
base.RemoveItem(index);
if (afterhandler != null)
{
afterhandler(this, new ItemRemovedArgs<T>(index, item));
}
if (handlerListChanged != null)
{
if (old != this)
handlerListChanged(this, null);
}
}
protected override void SetItem(int index, T item)
{
EventHandler<ItemSetArgs<T>> beforehandler = BeforeItemSet;
EventHandler<ItemSetArgs<T>> afterhandler = AfterItemSet;
EventHandler handlerListChanged = ListChanged;
WRListClass<T> old = this;
if (beforehandler != null)
{
beforehandler(this, new ItemSetArgs<T>(index, item));
}
base.SetItem(index, item);
if (afterhandler != null)
{
afterhandler(this, new ItemSetArgs<T>(index, item));
}
if (handlerListChanged != null)
{
if (old != this)
handlerListChanged(this, null);
}
}
}
public class ItemInsertedArgs<T> : EventArgs
{
public int Index;
public T Item;
public ItemInsertedArgs(int index, T item)
{
this.Index = index;
this.Item = item;
}
}
public class ItemSetArgs<T> : EventArgs
{
public int Index;
public T Item;
public ItemSetArgs(int index, T item)
{
this.Index = index;
this.Item = item;
}
}
public class ItemRemovedArgs<T> : EventArgs
{
public int Index;
public T Item;
public ItemRemovedArgs(int index, T item)
{
this.Index = index;
this.Item = item;
}
}
----USERCONTROL
[Designer("System.Windows.Forms.Design.ParentControlDesigner", "IDesigner")]
public partial class UserControl1 : UserControl
{
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
private WRListClass<GroupClass> pGroups = new WRListClass<GroupClass>();
public UserControl1()
{
InitializeComponent();
pGroups.AfterItemInserted += new EventHandler<ItemInsertedArgs<GroupClass>>(pGroups_AfterItemInserted);
pGroups.BeforeItemRemoved += new EventHandler<ItemRemovedArgs<GroupClass>>(pGroups_BeforeItemRemoved);
}
void pGroups_BeforeItemRemoved(object sender, ItemRemovedArgs<GroupClass> e)
{
if (e != null)
{
if (e.Item != null)
{
if (e.Item.GroupName != null)
{
if (e.Item.GroupName.Trim() != "")
{
if (e.Item.GroupControl != null)
{
e.Item.GroupControl.Parent = null;
this.Controls.Remove(e.Item.GroupControl);
e.Item.GroupControl.Dispose();
}
}
}
}
}
}
void pGroups_AfterItemInserted(object sender, ItemInsertedArgs<GroupClass> e)
{
if (e != null)
{
if (e.Item != null)
{
if (e.Item.GroupName != null)
{
if (e.Item.GroupName.Trim() != "")
{
if (e.Item.GroupControl == null)
{
e.Item.GroupControl = new GroupBox();
e.Item.GroupControl.TabIndex = pGroups.Count + 1;
e.Item.GroupControl.Text = e.Item.GroupName;
e.Item.GroupControl.Name = e.Item.ToString();
e.Item.GroupControl.Parent = this;
this.Controls.Add(e.Item.GroupControl);
e.Item.GroupControl.Dock = DockStyle.Top;
e.Item.GroupControl.BringToFront();
}
}
}
}
}
}
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
[EditorAttribute(typeof(System.ComponentModel.Design.CollectionEditor), typeof(System.Drawing.Design.UITypeEditor))]
public WRListClass<GroupClass> Groups
{
get { return pGroups; }
set {
pGroups = value;
}
}
}
Please help! Thanks!
|
|
|
|
|
I'm not going to bother reading that badly formatted code dump because:
1) because it is badly formatted
2) there is too much of it even if it were correctly formatted.
Solution:
1) cut out anything that is not relevant to the problem.
2) surround the remaining code with 'pre' tags and format it properly
You do not ask a question. What is it that you want to know?
Read this[^], before editing your original post. Pay particular attention to items 2, 4, 5 and 7.
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.”
|
|
|
|